<template>
	<view>
		<!-- 兼职发布 -->
		<view class="">
			<!-- 开始 职位标题-->
			<view class="Run_5" style="margin-top: 10rpx;">
				<text class="Run_5_1">职位标题</text>
				<uni-easyinput v-model="Jztitle" style="width: 90%;position: absolute;left: 150rpx; top: 30rpx;"
					:placeholderStyle="placeholderStyle" placeholder="请填相关工作岗位" :inputBorder="false">
				</uni-easyinput>
			</view>
			<!-- 结束 职位标题-->
		
			<!-- 开始 工作要求-->
			<view class="Run_5" style="margin-top: 10rpx;height: 340rpx;">
				<text class="Run_5_1">工作要求</text>
				<text style="position: absolute;
					top: 120rpx;
			left:40rpx;">1:</text>
				<uni-easyinput v-model="Jzyq1" style="width: 100%;position: absolute;left: 70rpx; top: 110rpx;"
					:placeholderStyle="placeholderStyle" :maxlength="40" placeholder="请填相关工作要求第一点:....."
					:inputBorder="false">
				</uni-easyinput>
				<text style="position: absolute;top: 180rpx;left:40rpx;">2:</text>
				<uni-easyinput v-model="Jzyq2" style="width: 100%;position: absolute;left: 70rpx; top: 170rpx;"
					:placeholderStyle="placeholderStyle" :maxlength="40" placeholder="请填相关工作要求第二点:....."
					:inputBorder="false">
				</uni-easyinput>
				<text style="position: absolute;top: 240rpx;left:40rpx;">3:</text>
				<uni-easyinput v-model="Jzyq3" style="width: 100%;position: absolute;left: 70rpx; top: 230rpx;"
					:placeholderStyle="placeholderStyle" :maxlength="40" placeholder="请填相关工作要求第三点:....."
					:inputBorder="false">
				</uni-easyinput>
			</view>
			<!-- 结束 工作要求-->
		
			<!-- 开始 工作内容-->
			<view class="Run_5" style="margin-top: 10rpx;height: 340rpx;">
				<text class="Run_5_1">工作内容</text>
				<text style="position: absolute;
					top: 120rpx;
			left:40rpx;">1:</text>
				<uni-easyinput v-model="Jznr1" style="width: 100%;position: absolute;left: 70rpx; top: 110rpx;"
					:placeholderStyle="placeholderStyle" :maxlength="40" placeholder="请填相关工作内容第一点:....."
					:inputBorder="false">
				</uni-easyinput>
				<text style="position: absolute;top: 180rpx;left:40rpx;">2:</text>
				<uni-easyinput v-model="Jznr2" style="width: 100%;position: absolute;left: 70rpx; top: 170rpx;"
					:placeholderStyle="placeholderStyle" :maxlength="40" placeholder="请填相关工作内容第二点:....."
					:inputBorder="false">
				</uni-easyinput>
				<text style="position: absolute;top: 240rpx;left:40rpx;">3:</text>
				<uni-easyinput v-model="Jznr3" style="width: 100%;position: absolute;left: 70rpx; top: 230rpx;"
					:placeholderStyle="placeholderStyle" :maxlength="40" placeholder="请填相关工作内容第三点:....."
					:inputBorder="false">
				</uni-easyinput>
			</view>
			<!-- 结束 工作内容-->
		
			<!-- 开始 固定薪资-->
			<view class="Run_5" style="margin-top: 10rpx;">
				<text class="Run_5_1">固定薪资</text>
				<uni-easyinput v-model="Jzmoney" style="width: 70%;position: absolute;left: 150rpx; top: 30rpx;"
					type="number" :placeholderStyle="placeholderStyle" placeholder="请填薪资 例:15元/时" :inputBorder="false">
				</uni-easyinput>
				<view class="uni-list" style="position: absolute;color: red;font-weight: bold;font-size: 14px;">
					<view class="uni-list-cell">
						<view class="uni-list-cell-db">
							<picker mode="selector" @change="bindPickerChange" :value="index" :range="array">
								<view class="uni-input"
									style="width: 670rpx;height: 134rpx;line-height: 134rpx;direction: rtl;padding-right: 25px;">
									{{array[Jz_Price_index]}}
								</view>
							</picker>
						</view>
					</view>
				</view>
				<image class="Run_4_4"
					src="https://bkimges.oss-cn-beijing.aliyuncs.com/images/%E5%8A%9F%E8%83%BD%E5%8C%BA%E5%8F%91%E5%B8%83-release/%E7%AE%AD%E5%A4%B4.png">
				</image>
			</view>
			<!-- 结束 固定薪资-->
		
			<!-- 开始 工作地点-->
			<view class="Run_5" style="margin-top: 10rpx;">
				<text class="Run_5_1">工作地点</text>
				<uni-easyinput v-model="Jzdlie" style="width: 90%;position: absolute;left: 150rpx; top: 30rpx;"
					:placeholderStyle="placeholderStyle" placeholder="请填写工作地点" :inputBorder="false">
				</uni-easyinput>
			</view>
			<!-- 结束 工作地点-->
		
			<!-- 开始 工作时段-->
			<view class="Run_5" style="margin-top: 10rpx;">
				<text class="Run_5_1">工作时段</text>
				<uni-easyinput v-model="Jztime" style="width: 90%;position: absolute;left: 150rpx; top: 30rpx;"
					:placeholderStyle="placeholderStyle" placeholder="例12:00-13:00多个时段用左斜杆分割" :inputBorder="false">
				</uni-easyinput>
			</view>
			<!-- 结束 工作时段-->
		
			<!-- 开始 工作日期-->
			<view class="Run_5" style="margin-top: 10rpx;">
				<text class="Run_5_1">工作日期</text>
				<view class="uni-list" style="position: absolute;color: red;font-weight: bold;font-size: 14px;">
					<view class="uni-list-cell">
						<view class="uni-list-cell-db">
							<picker mode="selector" @change="bindPickerChange_Jzdate" :value="index" :range="array2">
								<view class="uni-input"
									style="width: 670rpx;height: 134rpx;line-height: 134rpx;direction: rtl;padding-right: 25px;">
									{{array2[Jz_date_index2]}}
								</view>
							</picker>
						</view>
					</view>
				</view>
			</view>
			<!-- 结束 工作日期-->
		
			<!-- 开始 招聘单位-->
			<view class="Run_5" style="margin-top: 10rpx;">
				<text class="Run_5_1">招聘单位</text>
				<uni-easyinput v-model="JzCompany" style="width: 90%;position: absolute;left: 150rpx; top: 30rpx;"
					:placeholderStyle="placeholderStyle" placeholder="请填写招聘单位的名称如至诚三堂飘香馆" :inputBorder="false">
				</uni-easyinput>
			</view>
			<!-- 结束 招聘单位-->
			<!-- 开始 单位类型-->
			<view class="Run_5" style="margin-top: 10rpx;">
				<text class="Run_5_1">单位类型</text>
				<view class="uni-list" style="position: absolute;color: red;font-weight: bold;font-size: 14px;">
					<view class="uni-list-cell">
						<view class="uni-list-cell-db">
							<picker mode="selector" @change="bindPickerChange_Jzddwteype" :value="index"
								:range="array3">
								<view class="uni-input"
									style="width: 670rpx;height: 134rpx;line-height: 134rpx;direction: rtl;padding-right: 25px;">
									{{array3[Jz_dw_index3]}}
								</view>
							</picker>
						</view>
					</view>
				</view>
			</view>
			<!-- 结束 单位类型-->
			<!-- 开始 手机号-->
			<view class="Run_5" style="margin-top: 10rpx;">
				<text class="Run_5_1">手机号</text>
				<uni-easyinput v-model="Jzphone" style="width: 90%;position: absolute;left: 150rpx; top: 30rpx;"
					:placeholderStyle="placeholderStyle" placeholder="请填写联系方式" :inputBorder="false">
				</uni-easyinput>
			</view>
			<!-- 结束 手机号-->
		
			<!-- 开始 需求人数-->
			<view class="Run_5" style="margin-top: 10rpx;">
				<text class="Run_5_1">需求人数</text>
				<uni-easyinput v-model="Jzdemand" style="width: 90%;position: absolute;left: 150rpx; top: 30rpx;"
					type="number" :placeholderStyle="placeholderStyle" placeholder="请填写需求人数" :inputBorder="false">
				</uni-easyinput>
			</view>
			<!-- 结束 需求人数-->
			<!-- 发布按钮 -->
			<button class="uniBt_but uniBt_but222" style="margin-top: 1140rpx;" type="warn" size="default"
				@click="ReleaseGo()">确认修改</button>
			<view style="padding-top: 440rpx;">
		
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				array: ['元/时', '元/天', '元/周', '元/月', '元/年'],
				array2: ['--未选择--', '任意日期', '周末', '工作日', '其他'],
				array3: ['--未选择--', '食堂', '超市', '勤工', '其他'],
				//固定薪资类型
				Jz_Price_index:0,
				//选择的兼职日期类型
				Jz_date_index2: 0,
				//选择的兼职日期类型
				Jz_dw_index3: 0,
				//兼职信息
				Jzno:'',//发布的编号
				JzPubid:'',//兼职发布人的id
				JzUserid:'',//兼职报名人的id
				Jztitle: '', //兼职标题
				Jzyq1: '', //兼职工作要求
				Jzyq2: '', //兼职工作要求
				Jzyq3: '', //兼职工作要求
				Jznr1: '', //兼职工作内容
				Jznr2: '', //兼职工作内容
				Jznr3: '', //兼职工作内容
				Jzmoney: '', //兼职酬劳
				Jzprice_tyep: '', //兼职金额类型 元/时  元/天
				Jzdlie: '', //兼职地点
				Jztime: '', //兼职时段
				Jzdata: '', //兼职日期
				JzCompany: '', //兼职单位
				Jztype: '', //兼职类型 1 食堂 2超市  3 勤工  4其他
				Jzphone: '', //兼职发布人手机号
				Jzdemand: '', //兼职需求人数
			};
		},
		onLoad: function(option)  {
			
			this.Jzno='165554994554'
			this.JzPubid='02212691'
			this.JzUserid='212106710'
			this.Jztitle= '四堂飘香馆配送兼职'
			this.Jzyq1='勤奋、吃苦'
			this.Jzyq2='有责任心'
			this.Jzyq3= '能长期者优先'
			this.Jznr1= '能够在工作的时间段内到达食堂'
			this.Jznr2= '主要负责帮忙端菜'
			this.Jznr3= '偶尔负责看台'
			this.Jzmoney= '30'
			this.Jzprice_tyep= '元/时',
			this.Jzdlie='至诚学院第四食堂'
			this.Jztime='11:30-12:30/17:30-18:30'
			this.Jzdata='任意日期', //兼职日期
			this.JzCompany='飘香馆'
			this.Jztype='1'
			this.Jzphone='13712345678'
			this.Jzdemand='50'
			this.Jz_Price_index=2
			this.Jz_date_index2=1
			this.Jz_dw_index3=1
		},
		methods:{
			//数据加载
			Loadsj(){
				
				
			},
			//兼职绑定弹出框信息
			bindPickerChange: function(e) {
				console.log('picker发送选择改变，携带值为', e.detail.value)
				this.index = e.detail.value
				this.Jzprice_tyep = this.array[this.index]
			},
			//兼职日期
			bindPickerChange_Jzdate: function(e) {
				console.log('picker发送选择改变，携带值为', e.detail.value)
				this.index2 = e.detail.value
				this.Jzdata = this.array2[this.index2]
			},
			//兼职单位类型
			bindPickerChange_Jzddwteype: function(e) {
				console.log('picker发送选择改变，携带值为', e.detail.value)
				this.index3 = e.detail.value
				this.Jztype = this.array3[this.index3]
			},
			//确认修改
			ReleaseGo(){
				const that = this
				uni.showModal({
					title: '兼职信息提示',
					content: '确定修改发布的兼职信息吗?',
					cancelText: "取消",
					confirmText: "确定",
					success: function(res) {
						if (res.confirm) {
							console.log('用户点击确定');
							//当用户点击报名的时候提交报名信息 并且返回应聘中心
							console.log(that.Jzno + " " + that.JzPubid + " " + that.JzUserid + " " + that
								.Jztitle + " " + that.Jzyq1 + " " + that.Jzyq2 + " " + that
								.Jzyq3+" "+that.Jznr1 + " " + that.Jznr2 + " " + that.Jznr3 + " " + that
								.Jzmoney + " " + that.Jzprice_tyep + " " + that.Jzdlie + " " + that
								.Jztime+" "+that.Jzdata+" "+that.JzCompany+" "+that.Jztype+" "+that.Jzphone+" "+that.Jzdemand)
							//向数据库发送轻松
				
							//成功
							uni.$showMsg("兼职信息修改成功！")
							uni.reLaunch({
								url: '../../My_Applyfor'
							})
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				});
			}
		}
	}
</script>

<style lang="scss">
.Release {
		height: 200rpx;
	}

	.Release1 {
		border-width: 0px;
		position: absolute;
		left: 0px;
		top: 0px;
		width: 218rpx;
		height: 208rpx;
		display: flex;
		background-color: #ffffff;
		top: 20rpx;
		left: 20rpx;
		border-radius: 15px;
		//box-shadow: 5px 10px 10px #51d3d3;

	}

	.Release2 {
		border-width: 0px;
		position: absolute;
		left: 0px;
		top: 0px;
		width: 218rpx;
		height: 208rpx;
		width: 140rpx;
		height: 140rpx;
		left: 36rpx;
	}

	.Release3 {
		position: absolute;
		align-self: center;
		padding: 2px 2px 2px 2px;
		box-sizing: border-box;
		top: 150rpx;
		left: 30rpx;
		font-size: 15px;
		color: rgb(153, 153, 153);
		text-align: center;
		width: 160rpx;

	}

	.aaa {
		box-shadow: 5px 10px 10px #51d3d3;
	}

	.Release4 {
		font-size: 18px;
		color: #51d3d3;
		border-bottom: 3px solid #51d3d3;
		font-family: cursive;
		font-weight: 900;

	}

	.Release5 {
		border-width: 0px;
		position: absolute;
		left: 0px;
		top: 0px;
		width: 218rpx;
		height: 208rpx;
		display: flex;
		background-color: #ffffff;
		top: 20rpx;
		left: 20rpx;
		border-radius: 15px;
		//box-shadow: 5px 10px 10px #51d3d3;
		margin-left: 240rpx;
	}

	.Release6 {
		border-width: 0px;
		position: absolute;
		left: 0px;
		top: 0px;
		width: 218rpx;
		height: 208rpx;
		display: flex;
		background-color: #ffffff;
		top: 20rpx;
		left: 20rpx;
		border-radius: 15px;
		//box-shadow: 5px 10px 10px #51d3d3;
		margin-left: 480rpx;
	}

	//取件时间样式
	.Run_5 {
		position: relative;
		left: 34rpx;
		top: 50rpx;
		width: 688rpx;
		height: 132rpx;
		background-image: none;
		border: none;
		-moz-box-shadow: none;
		-webkit-box-shadow: none;
		box-shadow: none;
		border-radius: 15px;
		background-color: #ffffff;
		box-shadow: 5px 10px 10px #51d3d3;

	}

	.Run_5_1 {
		border-width: 0px;
		position: absolute;
		left: 36rpx;
		top: 45rpx;
		width: 600rpx;
		height: 38rpx;
		display: flex;
		font-family: '微软雅黑';
		font-weight: bold;
		font-style: normal;
	}

	.abe {
		position: absolute;
		left: 580rpx;
		top: 200rpx;
		font-size: 12px;
	}

	.Reaade1 {
		position: absolute;
		top: 80rpx;
		left: 55rpx;
	}

	.Run_55 {
		position: relative;
		left: 34rpx;
		top: 50rpx;
		width: 688rpx;
		height: 390rpx;
		background-image: none;
		border: none;
		-moz-box-shadow: none;
		-webkit-box-shadow: none;
		box-shadow: none;
		border-radius: 15px;
		background-color: #ffffff;
		box-shadow: 5px 10px 10px #51d3d3;

	}

	//按钮
	.uniBt_but {
		border-width: 0px;
		position: absolute;
		left: 25rpx;
		top: 950rpx;
		width: 330rpx;
		height: 70rpx;
		background: inherit;
		background-color: rgba(81, 211, 211, 1);
		border: none;
		border-radius: 14px;
		color: #FFFFFF;
		font-size: 13px;
	}

	.uniBt_but22 {
		box-shadow: 5px 6px 10px #51d3d3;
		border-radius: 100px;
		width: 700rpx;
		height: 90rpx;
		line-height: 90rpx;
		font-size: 15px;
		margin-top: 720rpx;
		margin-left: 0rpx;
	}

	.uniBt_but222 {
		box-shadow: 5px 6px 10px #51d3d3;
		border-radius: 100px;
		width: 700rpx;
		height: 90rpx;
		line-height: 90rpx;
		font-size: 15px;
		margin-top: 550rpx;
		margin-left: 0rpx;
	}

	.Run_fw_labe2 {
		display: flex;
		width: 300rpx;
		padding-top: 40rpx;
		margin-left: 160rpx;
		font-size: 18px;
	}

	.Run_fw_1 {
		position: absolute;
		top: 0px;
		left: 60rpx;
		padding-top: 4rpx;
	}

	//定位
	.down23 {
		position: absolute;
		width: 40rpx;
		height: 40rpx;
		left: 20rpx;
		top: 520rpx
	}

	.maerq1 {
		position: absolute;
		top: 526rpx;
		left: 60rpx;
		font-size: 24rpx;
		color: #C1C0C0;
	}

	.Run_4_4 {
		border-width: 0px;
		position: absolute;
		left: 310px;
		top: 24px;
		width: 22px;
		height: 20px;
		display: flex;
	}
</style>
